Deep dive: pandas test parity audit — fill xs test coverage gaps#261
Deep dive: pandas test parity audit — fill xs test coverage gaps#261
xs test coverage gaps#261Conversation
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/c6aeff19-4fd3-44f0-bd1a-26e491895e29 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
xs test coverage gaps
…errors - Replace string-literal property access rec["size"], rec["at"], rec["getLoc"] with dot notation in src/core/frame.ts - Refactor applyNearest in src/core/reindex.ts into three smaller helpers (buildLeftNearest, buildRightNearest, pickNearest) to bring cognitive complexity below the Biome limit of 15 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
Evergreen fix applied — resolved the Root causes:
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "releaseassets.githubusercontent.com"See Network Configuration for more information.
|
…t TS compliance - frame.ts: use rec["size"], rec["at"], rec["getLoc"] to satisfy noPropertyAccessFromIndexSignature - reindex.ts: use ?? -1 / ?? null for noUncheckedIndexedAccess on array element access Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
Evergreen CI Fix ✅Fixed 4 TypeScript errors caught by
|
Audit of test parity against pandas' own test suite: are we pinning every behaviour the implementation supports? File-level coverage is complete, but assertion-level coverage is uneven —
xsis the worked example.Audit findings
src/<module>/<file>.tshas a matchingtests/<module>/<file>.test.ts. Sole exception: the abstractsrc/core/base-index.ts, exercised transitively viaIndex/RangeIndex.src/stats/xs.tshonours the fullpandas.{DataFrame,Series}.xsoption surface, but the existing tests only covered the happy path with positive integer levels. Several supported behaviours had zero coverage.Gaps closed in
tests/stats/xs.test.ts(+19 cases, no production change)level: "letter"), negative indices (level: -1), and the corresponding error paths (out-of-range number, unknown name) for both DataFrame and Series.dropLevel: false— verifies the matched level and its name survive in the resultMultiIndex, for both DataFrame and Series.namepreservation on the duplicate-label branch.Result
Coverage of
src/stats/xs.tsrises from 76.92% → 92.31%; suite goes 6,765 → 6,784 tests, all green. The same audit pattern (probe the implementation's option surface against pandas docs, pin each branch) is the template to apply to the rest of the ported surface in follow-up PRs.